﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HRM.Controller
{
    public class Hospital_Controller : Standard_Controller
    {
        #region "Contructor"
        private static Hospital_Controller _instance;
        protected Hospital_Controller() { }
        protected void Dispose()
        {
            _instance = null;
        }
        private static object _syncLock = new object();
        public static Hospital_Controller Instance()
        {
            if (_instance == null)
            {
                lock (_syncLock)
                {
                    if (_instance == null)
                        _instance = new Hospital_Controller();
                }
            }
            return _instance;
        }
        public static Hospital_Controller Instance(String transName)
        {
            if (!String.IsNullOrEmpty(transName))
            {
                Hospital_Controller _instanceTrans = new Hospital_Controller();
                _instanceTrans.Trans_Name = transName;
                return _instanceTrans;
            }
            else
                return Instance();
        }
        #endregion

        public const String cs_Table_Name = "HRM_Hospital";

        public void Hospital_Import(string Hospital_Code, string Hospital_Name, string Hospital_RegionCode, string Hospital_IsUse, string Hospital_Level)
        {
            DataConnect.ExecuteNonQuery(DataConnect.WorkingConnect, Procedure_Name(cs_Table_Name, "HRM_Hospital_ImportExcel", false)
                , Hospital_Code
                , Hospital_Name
                , Hospital_RegionCode
                , Hospital_IsUse
                , Hospital_Level);
        }
    }
}
